import 'package:flutter_test/flutter_test.dart';
import 'package:pick_plus_ohos_huawei/pick_plus_ohos_huawei.dart';
import 'package:pick_plus_ohos_huawei/pick_plus_ohos_huawei_platform_interface.dart';
import 'package:pick_plus_ohos_huawei/pick_plus_ohos_huawei_method_channel.dart';
import 'package:plugin_platform_interface/plugin_platform_interface.dart';

class MockPickPlusOhosHuaweiPlatform
    with MockPlatformInterfaceMixin
    implements PickPlusOhosHuaweiPlatform {

  @override
  Future<String?> getPlatformVersion() => Future.value('42');
}

void main() {
  final PickPlusOhosHuaweiPlatform initialPlatform = PickPlusOhosHuaweiPlatform.instance;

  test('$MethodChannelPickPlusOhosHuawei is the default instance', () {
    expect(initialPlatform, isInstanceOf<MethodChannelPickPlusOhosHuawei>());
  });

  test('getPlatformVersion', () async {
    PickPlusOhosHuawei pickPlusOhosHuaweiPlugin = PickPlusOhosHuawei();
    MockPickPlusOhosHuaweiPlatform fakePlatform = MockPickPlusOhosHuaweiPlatform();
    PickPlusOhosHuaweiPlatform.instance = fakePlatform;

    expect(await pickPlusOhosHuaweiPlugin.getPlatformVersion(), '42');
  });
}
